package com.ioCStudy.service.impl;



import com.ioCStudy.dao.StudentDao;
import com.ioCStudy.pojo.Student;
import com.ioCStudy.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentDao studentDao;

    /*
    public void setStudentDao(StudentDao studentDao) {
        this.studentDao = studentDao;
    }
    */

    /*
    查询所有学生数据的业务
     */
    public List<Student> findAll() {
        List<Student> students = studentDao.queryAll();
        System.out.println("StudentService:" + students);
        return students;
    }
}
